3.562 \(\int \frac{A+B x^2}{x^2 \sqrt{a+b x^2}} \, dx\)

Optimal. Leaf size=47 \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \sqrt{a+b x^2}}{a x} \]

[Out]

-((A*Sqrt[a + b*x^2])/(a*x)) + (B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b]

________________________________________________________________________________________

Rubi [A]  time = 0.0176591, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {451, 217, 206} \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \sqrt{a+b x^2}}{a x} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x^2)/(x^2*Sqrt[a + b*x^2]),x]

[Out]

-((A*Sqrt[a + b*x^2])/(a*x)) + (B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b]

Rule 451

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[d/e^n, Int[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a,
 b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n*(p + 1) + 1, 0] && (IntegerQ[n] || GtQ[e, 0]) && (
(GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1]))

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{A+B x^2}{x^2 \sqrt{a+b x^2}} \, dx &=-\frac{A \sqrt{a+b x^2}}{a x}+B \int \frac{1}{\sqrt{a+b x^2}} \, dx\\ &=-\frac{A \sqrt{a+b x^2}}{a x}+B \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{x}{\sqrt{a+b x^2}}\right )\\ &=-\frac{A \sqrt{a+b x^2}}{a x}+\frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}\\ \end{align*}

Mathematica [A]  time = 0.0167366, size = 47, normalized size = 1. \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \sqrt{a+b x^2}}{a x} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x^2)/(x^2*Sqrt[a + b*x^2]),x]

[Out]

-((A*Sqrt[a + b*x^2])/(a*x)) + (B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b]

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 41, normalized size = 0.9 \begin{align*}{B\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){\frac{1}{\sqrt{b}}}}-{\frac{A}{ax}\sqrt{b{x}^{2}+a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x^2+A)/x^2/(b*x^2+a)^(1/2),x)

[Out]

B*ln(x*b^(1/2)+(b*x^2+a)^(1/2))/b^(1/2)-A*(b*x^2+a)^(1/2)/a/x

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x^2/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.58099, size = 255, normalized size = 5.43 \begin{align*} \left [\frac{B a \sqrt{b} x \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) - 2 \, \sqrt{b x^{2} + a} A b}{2 \, a b x}, -\frac{B a \sqrt{-b} x \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) + \sqrt{b x^{2} + a} A b}{a b x}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x^2/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[1/2*(B*a*sqrt(b)*x*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) - 2*sqrt(b*x^2 + a)*A*b)/(a*b*x), -(B*a*sq
rt(-b)*x*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) + sqrt(b*x^2 + a)*A*b)/(a*b*x)]

________________________________________________________________________________________

Sympy [A]  time = 1.21968, size = 99, normalized size = 2.11 \begin{align*} - \frac{A \sqrt{b} \sqrt{\frac{a}{b x^{2}} + 1}}{a} + B \left (\begin{cases} \frac{\sqrt{- \frac{a}{b}} \operatorname{asin}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b < 0 \\\frac{\sqrt{\frac{a}{b}} \operatorname{asinh}{\left (x \sqrt{\frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b > 0 \\\frac{\sqrt{- \frac{a}{b}} \operatorname{acosh}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{- a}} & \text{for}\: b > 0 \wedge a < 0 \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x**2+A)/x**2/(b*x**2+a)**(1/2),x)

[Out]

-A*sqrt(b)*sqrt(a/(b*x**2) + 1)/a + B*Piecewise((sqrt(-a/b)*asin(x*sqrt(-b/a))/sqrt(a), (a > 0) & (b < 0)), (s
qrt(a/b)*asinh(x*sqrt(b/a))/sqrt(a), (a > 0) & (b > 0)), (sqrt(-a/b)*acosh(x*sqrt(-b/a))/sqrt(-a), (b > 0) & (
a < 0)))

________________________________________________________________________________________

Giac [A]  time = 1.1221, size = 78, normalized size = 1.66 \begin{align*} -\frac{B \log \left ({\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )}^{2}\right )}{2 \, \sqrt{b}} + \frac{2 \, A \sqrt{b}}{{\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )}^{2} - a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x^2/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

-1/2*B*log((sqrt(b)*x - sqrt(b*x^2 + a))^2)/sqrt(b) + 2*A*sqrt(b)/((sqrt(b)*x - sqrt(b*x^2 + a))^2 - a)